package eshop.local.ui;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class EshopServerGUI extends JFrame{
	
	JLabel name;
	JLabel serverLabel;
	JPanel upper;
	JPanel lower;
	String server;
	
	public EshopServerGUI (String nummer){
		server = nummer;
		initialize();
	}
	
	private void initialize() {
		
		this.setLayout(new BorderLayout());
		this.setSize(300, 150);
		this.addWindowListener(new MyWindowCloser());
		upper = new JPanel();
		name = new JLabel("### Eshop Server 0.1 ###");	
		upper.add(name);
		this.add(upper, BorderLayout.NORTH);
		lower = new JPanel();
		serverLabel = new JLabel("Connection received from "+server);
		lower.add(serverLabel);
		this.add(lower, BorderLayout.SOUTH);
		this.setVisible(true);
	}

}